The invention relates to a method and apparatus for performing an adaptive extended dynamic range (EDR) algorithm of an x-ray imaging system used for the purpose of compressing an image down to an allowable gray scale range.
One of the fundamental image processing algorithms used in digital x-ray imaging is commonly referred to as extended dynamic range (EDR), which is a form of unsharp masking. The objective of the algorithm is to compress the xe2x80x9cDCxe2x80x9d, or mean, component of different regions comprising the image so that the allowable gray scale range of the displayed image, which typically is 0 to 255, may be applied in a fashion which maximizes the contrast of the higher frequency components of the image.
The human eye is generally only capable of visually perceiving 256 levels of gray (i.e., each pixel being defined by an 8-bit number ranging from 0 to 255). However, images typically have a much greater dynamic range than what is allowed by a gray scale range of 256. Therefore, EDR algorithms are used to compress the image down to the allowable dynamic range defined by 256 levels of gray while attempting to preserve the contrast of the higher frequency components in the image.
The conventional approach to performing the EDR algorithm was simply to subtract the mean from the input signal. However, in some situations, this resulted in important contrast information being removed from the image or being artificially enhanced. Therefore, improvements were subsequently made to the EDR algorithm so that compression would be less likely to result in loss of higher frequency contrast information or introduction of artifacts.
FIG. 1 illustrates an existing EDR processing component currently utilized in x-ray imaging. The EDR processing component shown in FIG. 1 is an improvement over the aforementioned conventional approach in that it does not necessarily perform a straight subtraction of the local mean intensity value from the input intensity value. Rather, the EDR processing component shown in FIG. 1 subtracts more of the local mean intensity value when the input signal has a higher intensity value and less of the local mean intensity value when the input signal has a lower intensity value. This approach preserves more of the high frequency contrast information than the conventional approach.
The EDR processing component of FIG. 1 performs its functions in the following manner. The intensity value X of an input pixel in the image is first processed by a BOXCAR component 1, which determines the local mean intensity value at that particular pixel location. The BOXCAR component utilizes a neighborhood of pixels, which includes the input pixel, to calculate the local mean. The local mean is represented in FIG. 1 by the X with the bar above it.
The solid curve 5 shown in FIG. 7 represents the image intensity of the input signal crossing a heart-to-lung border in the image. The lung corresponds to a higher image intensity than the heart due to the fact that the lung is filled with air and therefore absorbs less x-rays. The dotted curve 6 corresponds to the calculated mean.
Once the BOXCAR component 1 has determined the local mean intensity value, the local mean intensity value is output to the BOOST component 2 which determines how much of the local mean intensity value is to be subtracted from the input signal by the ADD component 3. Typically, the BOXCAR and GAMMA components 2 and 4, respectively, each comprise a lookup table. The respective inputs to these components cause a particular value to be output from the lookup table of the component and delivered to the next component in the processing chain. By using lookup tables in this manner, the EDR functions can be performed quickly in real time on the fly without having to perform the corresponding calculations. The BOXCAR and ADD components 1 and 3, respectively, perform their respective calculations on the fly.
The ADD component 3 subtracts a certain amount of the local mean intensity value from the input signal in accordance with the value output from the lookup table of the BOOST component 2. The dashed curve 7 in FIG. 7 corresponds to the image signal once the mean 6, or a portion of it, has been subtracted from the input signal 5.
Once the local mean intensity value has been subtracted from the input image intensity value, any portion of the signal 7 which has an intensity value greater than 255 is compressed by the GAMMA component 4 to a maximum value of 255. Generally, the GAMMA component 4 is a roll off filter which gradually rolls off the signal to avoid abruptly clipping the signal and creating artifacts in the output signal Y.
The functions of the EDR processing component shown in FIG. 1 can be expressed algorithmically as:
y(i, j)=GAMMA[x(i, j)xe2x88x92BOOST[{overscore (x)}(i, j)]],xe2x80x83xe2x80x83Eq. 1
where y(i, j) is the (i, j)th pixel value of the output image, x(i, j) is the (i, j)th pixel value of the input image and {overscore (x)}(i, j) is the local mean intensity value of the (i, j)th pixel derived from a BOXCAR average. The lookup table (LUT) of the BOOST component 2 specifies the intensity reduction of the original signal as a function of the local mean intensity value. The LUT of the GAMMA component 4 compresses the result of the subtraction operation to 256 levels (8 bits). The LUTs are indexed by the appropriate pixel intensity values given in the equation.
In the EDR processing component shown in FIG. 1, the BOOST component 2 evaluates the intensity value of the input pixel. When the BOOST component 2 determines that the intensity value of the input pixel is large, the BOOST component 2 determines that a large percentage of the local mean intensity value is to be subtracted from the input signal. The ADD component 3 then subtracts the appropriate percentage of the local mean intensity value from the input signal.
Conversely, when the BOOST component 2 determines that the intensity value of the input pixel is small, the BOOST component 2 determines that a small percentage of the local mean intensity value is to be subtracted from the input signal. The ADD component 3 then subtracts the appropriate percentage of the local mean intensity value from the input signal.
Although the algorithm of the EDR processing component of FIG. 1 improves over algorithms performed by earlier EDR processing components, which merely subtracted the local mean intensity signal from the input signal, the EDR processing component of FIG. 1 assumes that the image is of a particular dynamic range. The person operating the x-ray imaging system is provided with a few settings which allow the user to manually select between one of three dynamic ranges. The EDR processing component then subtracts a particular percentage of the local mean intensity value from the input image intensity value based on the setting selected by the user.
One of the problems with the EDR processing component shown in FIG. 1 is that it relies on selection of the proper dynamic range by the user. If the user fails to select the appropriate setting for the dynamic range, the displayed image may have poor image quality. In many cases, this may result in the loss of more high frequency contrast information than is necessary to perform the compression.
Another problem with the EDR processing component shown in FIG. 1 is that of enhanced blacks caused by exaggeration of negative contrast regions in the image. When a region in the image such as, for example, a vessel filled with dye, has an image intensity which is less than the surrounding local mean intensity value, the EDR processing component of FIG. 1 will exaggerate the negative contrast associated with the darker region when it subtracts the local mean intensity values from the intensity values associated with the darker region. This exaggerated negative contrast may result in artifacts, which can lead to misdiagnosis.
It would be desirable to provide an EDR processing component which overcomes the deficiencies of the aforementioned EDR processing components. In particular, it would be desirable to provide an EDR processing component which overcomes problems associated with enhanced blacks and which adaptively adjusts to the dynamic range of the image so that high frequency contrast information is preserved during compression.
Accordingly, a need exists for an EDR processing component which performs the aforementioned compression algorithm, which automatically adapts to the dynamic range of the image to thereby preserve high frequency contrast information in the compressed image, and which prevents artifacts associated with enhanced blacks from occurring in the compressed image.
The invention provides a method and apparatus for performing an extended dynamic range (EDR) algorithm. The apparatus comprises an EDR processing component which performs the EDR algorithm of the invention in order to compress an image input to the EDR processing component down to a desired gray scale range.
In accordance with a first embodiment of the invention, the EDR processing component automatically adapts to the dynamic range of an input image so that the input image is compressed down to a desired gray scale range while preserving high frequency contrast information contained in the input image.
In accordance with a second embodiment of the invention, the EDR processing component processes the input image in accordance with a dynamic range which is either fixed or which is set by a user. In accordance with this embodiment, the EDR processing component compresses the input image in such a manner that the difference between the input image intensity and the local mean intensity value is taken into account.
In regions where the input image intensity value differs greatly from the local mean intensity value, a relatively smaller percentage of the local mean intensity value is subtracted from the input image. In regions where the difference between the input image intensity value and the local mean intensity value is relatively small, a relatively larger percentage of the local mean intensity value is subtracted from the input image. This prevents enhanced negative contrast artifacts from occurring in the compressed image.